package com.wn55.hrms.mapper;

import com.wn55.hrms.entity.Permission;
import com.wn55.hrms.service.vo.PermissionVo;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PermissionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Permission record);

    Permission selectByPrimaryKey(Long id);

    List<Permission> selectAll();

    int updateByPrimaryKey(Permission record);

    List<PermissionVo> initLoadAllPermission();

    List<PermissionVo> searchRoleMenuByEmpName(String name);

    List<Permission> listByCondition(String name);

    @Select("select * from url_permission where parent_id=-1")
    List<Permission> listPermissionParent();

}